package com.hmall.cart;

import com.hmall.api.config.DefaultFeignConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

/**
 * 购物车服务启动类
 */
//开启OPENfeign客户端
//@EnableFeignClients(clients = {ItemCline.class})
//开启OPENfeign客户端，扫描所有带有@FeignClient注解的接口
//@EnableFeignClients(basePackages = "com.hmall.api.client")
//开启OPENfeign客户端，扫描所有带有@FeignClient注解的接口，并为所有Feign客户端配置默认配置类
//@EnableFeignClients(basePackages = "com.hmall.api.client", defaultConfiguration = DefaultFeignConfig .class)
//开启OPENfeign客户端，扫描所有带有@FeignClient注解的接口，并为指定名称的Feign客户端配置默认配置类
@EnableFeignClients(basePackages = "com.hmall.api.client", defaultConfiguration = DefaultFeignConfig .class)
@MapperScan("com.hmall.cart.mapper")
@SpringBootApplication
@ComponentScan(basePackages = {"com.hmall.cart", "com.hmall.common"})
public class cartApplication {
    public static void main(String[] args) {
        SpringApplication.run(cartApplication.class, args);
    }
}
